import request from '@/utils/request'
/**
 * @description 获取列表
 */
export function getList(userId, company, page, dataNum) {
  const data = {
    userId: userId * 1,
    company: company,
    page: page * 1,
    dataNum: dataNum * 1
  }
  return request({
    // url: `queryUserDeviceByUserid?params=${JSON.stringify(data)}`,
    url: `queryUserInfoByUseridPage?params=${JSON.stringify(data)}`,
    method: 'post'
  })
}

export function getCompany(userId, company, page, dataNum) {
  const data = {
    userId: userId * 1
  }
  return request({
    // url: `queryUserDeviceByUserid?params=${JSON.stringify(data)}`,
    url: `queryUserInfoAll?params=${JSON.stringify(data)}`,
    method: 'post'
  })
}

/**
 * @description 根据测点好查询实时数据接口
 */
export function getDetailsByDeviceMac(deviceMac) {
  const data = {
    deviceMac: deviceMac
  }
  return request({
    url: `queryDeviceData?params=${JSON.stringify(data)}`,
    method: 'post'
  })
}

/**
 * @description 根据测点好查询实时数据接口
 */
export function getDeviceDataMA(deviceMac) {
  const data = {
    deviceMac: deviceMac
  }
  return request({
    url: `getDeviceDataMA?params=${JSON.stringify(data)}`,
    method: 'post'
  })
}
